﻿using MediatR;
using SmartProduction.Domain.客户管理;
using SmartProduction.Domain.采购委外订单;
using SmartProduction.ErrorCode;
using System.ComponentModel.DataAnnotations;

namespace SmartProduction.Write.API.Application.Commands.SalesOrderDetailsCommand
{
    /// <summary>
    /// 销售订单明细新增命令
    /// </summary>
    public class SalesOrderDetailsCreateCommand : IRequest<APIResult<object>>
    {
        public int SalesOrderDetailsId { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 单价(不含税)
        /// </summary>
        public string? Price { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Num { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public string? AllPrice { get; set; }

        /// <summary>
        /// 行金额(不含税)
        /// </summary>
        public string? AmountPrice { get; set; }

        /// <summary>
        /// 行摘要
        /// </summary>
        public string ReportRows { get; set; }  

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }


        /// <summary>
        /// 信息外键
        /// </summary>
        public int? MaterialId { get; set; }

        /// <summary>
        /// 订单编码
        /// </summary>
        [StringLength(50)]
        public string? SalesOrderNumer { get; set; }

        /// <summary>
        /// 详情
        /// </summary>
        public List<SalesOrderDetails> SalesOrderDetailss { get; set; }
    }
}
